package cn.laixueit.common;

import java.text.SimpleDateFormat;
import java.util.Date;

public class User {

    private String name;
    private String address;
    private Integer age;
    private Date date;
    /*User(String name){
        this.name = name;
    }*/

    public User(String name, Integer age) {
        this.name = name;
        this.age = age;
    }

    public User(String name, String address, Integer age) {
        this.name = name;
        this.address = address;
        this.age = age;
    }

    public User(String name, String address, Date date) {
        this.name = name;
        this.address = address;
        this.date = date;
    }

    public User(String name, Integer age, Date date) {
        this.name = name;
        this.age = age;
        this.date = date;
    }
    public void show(){
        System.out.println("user..show........");
    }

    public void init(){
        System.out.println("userBean创建了");
    }
    public void destory1(){
        System.out.println("userBean销毁了");
    }

    @Override
    public String toString() {

        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        String now = format.format(date);

        return "User{" +
                "name='" + name + '\'' +
                ", address='" + address + '\'' +
                ", age=" + age +
                ", date=" + now +
                '}';
    }
}
